<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <script src="js/jquery.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="css/wx.css" rel="stylesheet">
    <script src="js/deviceInfo.js"></script>
    <title>设备详情</title>
</head>
<body>
<div class="row-center row-btn" style="margin-top: 20px">
    <a class="btn btn-blue col-xs-3"  id="scanQRCode">扫一扫</a>
    <a class="btn btn-blue col-xs-3 pull-right">搜索</a>
    <input type="text" style="height: 36px;" class="col-xs-5 pull-right">
</div>

<div class="row-table row" tyle="padding: 0;border: 1px solid #d4d4d4">
    <div class="row" id="checkBox" style="margin-bottom: 0">
        <a class="btn col-xs-3 active" href="#baseInfo">基础信息</a>
        <a class="btn col-xs-3" href="#userInfo">使用信息</a>
        <a class="btn col-xs-3" href="#buyInfo">采购信息</a>
        <div class="dropdown col-xs-3">
            <a id="moreBtn" class="btn" style="width: 100%" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                更多
                <span class="caret"></span>
            </a>
            <ul class="dropdown-menu" aria-labelledby="moreBtn">
                <li style="width: 100%;"><a href="#maintainInfo">维护信息</a></li>
                <li style="width: 100%;"><a href="#checkInfo">检测信息</a></li>
            </ul>
        </div>
    </div>
    <div style="height: 300px;overflow-y: scroll">
        <div class="row row-table">
            <!--基础信息锚点-->
            <a name="baseInfo"></a>
            <div class="row-info" style="background-color: #d4d4d4">
                <span class="col-xs-6 span-name">基础信息</span>
            </div>
            <div class="row-center row-info" style="border-top: 1px solid #F3F3F3">
                <span class="col-xs-6 span-name">设备种类</span>
                <span class="col-xs-6 span-value ">呼吸机</span>
            </div>
            <div class="row-center row-info" style="border-top: 1px solid #F3F3F3">
                <span class="col-xs-6 span-name">设备品牌</span>
                <span class="col-xs-6 span-value ">飞利浦</span>
            </div>
            <div class="row-center row-info" style="border-top: 1px solid #F3F3F3">
                <span class="col-xs-6 span-name">设备型号</span>
                <span class="col-xs-6 span-value ">X001</span>
            </div>
            <div class="row-center row-info" style="border-top: 1px solid #F3F3F3">
                <span class="col-xs-6 span-name">院内编号</span>
                <span class="col-xs-6 span-value ">hxj10001</span>
            </div>
            <div class="row-center row-info" style="border-top: 1px solid #F3F3F3">
                <span class="col-xs-6 span-name">出厂序列号</span>
                <span class="col-xs-6 span-value ">X001</span>
            </div>
            <div class="row-center row-info" style="border-top: 1px solid #F3F3F3">
                <span class="col-xs-6 span-name">自定义名</span>
                <span class="col-xs-6 span-value ">呼吸机</span>
            </div>
            <div class="row-center row-info" style="border-top: 1px solid #F3F3F3">
                <span class="col-xs-6 span-name">负责工程师</span>
                <span class="col-xs-6 span-value right">刘洋</span>
            </div>
        </div>

        <div class="row row-table">
            <!--使用信息锚点-->
            <a name="userInfo"></a>
            <div class="row-info" style="background-color: #d4d4d4">
                <span class="col-xs-6 span-name">使用信息</span>
            </div>
            <div class="row-center row-info" style="border-top: 1px solid #F3F3F3">
                <span class="col-xs-6 span-name">使用科室</span>
                <span class="col-xs-6 span-value ">手术室</span>
            </div>
            <div class="row-center row-info" style="border-top: 1px solid #F3F3F3">
                <span class="col-xs-6 span-name">使用房间</span>
                <span class="col-xs-6 span-value ">501</span>
            </div>
            <div class="row-center row-info" style="border-top: 1px solid #F3F3F3">
                <span class="col-xs-6 span-name">联系方式</span>
                <span class="col-xs-6 span-value ">18042317069</span>
            </div>
            <div class="row-center row-info" style="border-top: 1px solid #F3F3F3">
                <span class="col-xs-6 span-name">领用时间</span>
                <span class="col-xs-6 span-value ">2015-1-11</span>
            </div>
            <div class="row-center row-info" style="border-top: 1px solid #F3F3F3">
                <span class="col-xs-6 span-name">设备负责人</span>
                <span class="col-xs-6 span-value ">刘洋</span>
            </div>
            <div class="row-center row-info" style="border-top: 1px solid #F3F3F3">
                <span class="col-xs-6 span-name">日均使用次数</span>
                <span class="col-xs-6 span-value ">3</span>
            </div>
        </div>

        <div class="row row-table">
            <!--采购信息锚点-->
            <a name="buyInfo"></a>
            <div class="row-info" style="background-color: #d4d4d4">
                <span class="col-xs-6 span-name">采购信息</span>
            </div>
            <div class="row-center row-info" style="border-top: 1px solid #F3F3F3">
                <span class="col-xs-6 span-name">生产厂家</span>
                <span class="col-xs-6 span-value ">XXX</span>
            </div>
            <div class="row-center row-info" style="border-top: 1px solid #F3F3F3">
                <span class="col-xs-6 span-name">厂家联系人</span>
                <span class="col-xs-6 span-value ">XXX</span>
            </div>
            <div class="row-center row-info" style="border-top: 1px solid #F3F3F3">
                <span class="col-xs-6 span-name">厂家联系方式</span>
                <span class="col-xs-6 span-value ">XXX</span>
            </div>
            <div class="row-center row-info" style="border-top: 1px solid #F3F3F3">
                <span class="col-xs-6 span-name">经销商</span>
                <span class="col-xs-6 span-value ">XXX</span>
            </div>
            <div class="row-center row-info" style="border-top: 1px solid #F3F3F3">
                <span class="col-xs-6 span-name">经销商联系人</span>
                <span class="col-xs-6 span-value ">XXX</span>
            </div>
            <div class="row-center row-info" style="border-top: 1px solid #F3F3F3">
                <span class="col-xs-6 span-name">经销商联系方式</span>
                <span class="col-xs-6 span-value ">XXX</span>
            </div>
            <div class="row-center row-info" style="border-top: 1px solid #F3F3F3">
                <span class="col-xs-6 span-name">设备价格</span>
                <span class="col-xs-6 span-value ">XXX</span>
            </div>
            <div class="row-center row-info" style="border-top: 1px solid #F3F3F3">
                <span class="col-xs-6 span-name">设备来源</span>
                <span class="col-xs-6 span-value ">XXX</span>
            </div>
            <div class="row-center row-info" style="border-top: 1px solid #F3F3F3">
                <span class="col-xs-6 span-name">采购日期</span>
                <span class="col-xs-6 span-value ">XXX</span>
            </div>
            <div class="row-center row-info" style="border-top: 1px solid #F3F3F3">
                <span class="col-xs-6 span-name">保修年限</span>
                <span class="col-xs-6 span-value ">XXX</span>
            </div>
        </div>

        <div class="row row-table">
            <!--维护信息锚点-->
            <a name="maintainInfo"></a>
            <div class="row-info" style="background-color: #d4d4d4">
                <span class="col-xs-6 span-name">维护信息</span>
            </div>
            <div class="row-center row-info" style="border-top: 1px solid #d4d4d4">
                <span class="col-xs-6 span-name">设备维护公司</span>
                <span class="col-xs-6 span-value text-right">XXX</span>
            </div>
            <div class="row-center row-info" style="border-top: 1px solid #d4d4d4">
                <span class="col-xs-6 span-name">公司联系人</span>
                <span class="col-xs-6 span-value text-right">XXX</span>
            </div>
            <div class="row-center row-info" style="border-top: 1px solid #d4d4d4">
                <span class="col-xs-6 span-name">联系方式</span>
                <span class="col-xs-6 span-value text-right">XXX</span>
            </div>
            <div class="row-center row-info" style="border-top: 1px solid #d4d4d4">
                <span class="col-xs-6 span-name">起始维护时间</span>
                <span class="col-xs-6 span-value text-right">XXX</span>
            </div>
        </div>

        <div class="row row-table">
            <!--检测信息锚点-->
            <a name="checkInfo"></a>
            <div class="row-info" style="background-color: #d4d4d4">
                <span class="col-xs-6 span-name">检测信息</span>
            </div>
            <div class="row-center row-info" style="border-top: 1px solid #d4d4d4">
                <span class="col-xs-6 span-name">巡检</span>
                <span class="col-xs-6 span-value text-right">XXX</span>
            </div>
            <div class="row-center row-info" style="border-top: 1px solid #d4d4d4">
                <span class="col-xs-6 span-name">PM检测</span>
                <span class="col-xs-6 span-value text-right">XXX</span>
            </div>
            <div class="row-center row-info" style="border-top: 1px solid #d4d4d4">
                <span class="col-xs-6 span-name">性能检测</span>
                <span class="col-xs-6 span-value text-right">XXX</span>
            </div>
        </div>
    </div>
</div>

<div class="row row-center row-btn">
    <a class="btn btn-blue">返回</a>
</div>
<script src="http://res.wx.qq.com/open/js/jweixin-1.1.0.js"></script>
<script type="text/javascript">
	// 微信配置
	$.getJSON("${baseUrl!}/api/getJsConfig", {
	    "url": location.href.split('#')[0]
	   },
	    function(json, textStatus) {
	        wx.config({
	            debug: false, 
	            appId: json.appId, 
	            timestamp: json.timestamp, 
	            nonceStr: json.nonce, 
	            signature: json.signature,
	            jsApiList: [
	                        'scanQRCode',
	                      ]
	        });
	});
</script>

<script type="text/javascript">
wx.ready(function () {
  // 9 微信原生接口
  // 9.1.2 扫描二维码并返回结果
  document.querySelector('#scanQRCode').onclick = function () {
	  wx.scanQRCode({
		    needResult: 1, // 默认为0，扫描结果由微信处理，1则直接返回扫描结果，
		    scanType: ["qrCode","barCode"], // 可以指定扫二维码还是一维码，默认二者都有
		    success: function (res) {
		    var result = res.resultStr; // 当needResult 为 1 时，扫码返回的结果

		    var para = result.split('?')[1];
		    alert(para);
		    window.location.href="${baseUrl!}/device?"+para;
		}
	});
  };
});

wx.error(function (res) {
  alert(res.errMsg);
});
</script>

</body>
</html>